package com.jt.controller.pojo;

import com.jt.controller.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller//SpringMvc 专门扫描的注解
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        return "你好mvc";
    }
    @RequestMapping("/getUser")
    @ResponseBody
    public Object getUser(){
        User user = new User();
        user.setA(123);
        user.setB("456");
        return user;
    }
}
